package com.ruoyi.level.domain;

import java.time.LocalDate;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.v3.oas.annotations.media.Schema;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 用户积分等级规则对象 points_level_rule
 * 
 * @author 区嘉盛
 * @date 2025-06-16
 */
@Schema(description = "用户积分等级规则对象")
public class PointsLevelRule extends BaseEntity
{
    private static final long serialVersionUID = 1L;


    /** 自增ID */
    @Schema(title = "自增ID")
    @Excel(name = "自增ID")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long id;

    /** 逻辑主键-等级编码 */
    @Schema(title = "逻辑主键-等级编码")
    private String levelCode;

    /** 等级体系编码 */
    @Schema(title = "等级体系编码")
    private String systemCode;

    /** 等级体系名称（如：航海体系、军事体系等） */
    @Schema(title = "等级体系名称（如：航海体系、军事体系等）")
    @Excel(name = "等级体系名称", readConverterExp = "如=：航海体系、军事体系等")
    private String systemName;

    /** 等级名称（如：初级、进阶、专家等） */
    @Schema(title = "等级名称（如：初级、进阶、专家等）")
    @Excel(name = "等级名称", readConverterExp = "如=：初级、进阶、专家等")
    private String levelName;

    /** 等级图标URL */
    @Schema(title = "等级图标")
    @Excel(name = "等级图标")
    private String levelIcon;

    /** 该等级所需最低积分 */
    @Schema(title = "该等级所需最低积分")
    @Excel(name = "该等级所需最低积分")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long minPoints;

    /** 该等级允许的最高积分 */
    @Schema(title = "该等级允许的最高积分")
    @Excel(name = "该等级允许的最高积分")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long maxPoints;

    /** 排序号（从小到大） */
    @Schema(title = "排序号（从小到大）")
    @Excel(name = "排序号", readConverterExp = "从小到大")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long sortOrder;

    /** 等级状态 1-启用 2-停用 */
    @Schema(title = "等级状态 1-启用 2-停用")
    @Excel(name = "等级状态 1-启用 2-停用")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long levelStatus;

    /** 创建人 */
    @Schema(title = "创建人")
    @Excel(name = "创建人")
    private String createdBy;

    /** 创建时间 */
    @Schema(title = "创建时间")
    private LocalDate createdTime;

    /** 更新人 */
    @Schema(title = "更新人")
    private String updatedBy;

    /** 更新时间 */
    @Schema(title = "更新时间")
    private LocalDate updatedTime;

    /** 删除标志 0-未删除 1-已删除 */
    @Schema(title = "删除标志 0-未删除 1-已删除")
    private Long deletedFlag;
    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }


    public void setLevelCode(String levelCode) 
    {
        this.levelCode = levelCode;
    }

    public String getLevelCode() 
    {
        return levelCode;
    }


    public void setSystemCode(String systemCode) 
    {
        this.systemCode = systemCode;
    }

    public String getSystemCode() 
    {
        return systemCode;
    }


    public void setSystemName(String systemName) 
    {
        this.systemName = systemName;
    }

    public String getSystemName() 
    {
        return systemName;
    }


    public void setLevelName(String levelName) 
    {
        this.levelName = levelName;
    }

    public String getLevelName() 
    {
        return levelName;
    }


    public void setLevelIcon(String levelIcon) 
    {
        this.levelIcon = levelIcon;
    }

    public String getLevelIcon() 
    {
        return levelIcon;
    }


    public void setMinPoints(Long minPoints) 
    {
        this.minPoints = minPoints;
    }

    public Long getMinPoints() 
    {
        return minPoints;
    }


    public void setMaxPoints(Long maxPoints) 
    {
        this.maxPoints = maxPoints;
    }

    public Long getMaxPoints() 
    {
        return maxPoints;
    }


    public void setSortOrder(Long sortOrder) 
    {
        this.sortOrder = sortOrder;
    }

    public Long getSortOrder() 
    {
        return sortOrder;
    }


    public void setLevelStatus(Long levelStatus) 
    {
        this.levelStatus = levelStatus;
    }

    public Long getLevelStatus() 
    {
        return levelStatus;
    }


    public void setCreatedBy(String createdBy) 
    {
        this.createdBy = createdBy;
    }

    public String getCreatedBy() 
    {
        return createdBy;
    }


    public void setCreatedTime(LocalDate createdTime) 
    {
        this.createdTime = createdTime;
    }

    public LocalDate getCreatedTime() 
    {
        return createdTime;
    }


    public void setUpdatedBy(String updatedBy) 
    {
        this.updatedBy = updatedBy;
    }

    public String getUpdatedBy() 
    {
        return updatedBy;
    }


    public void setUpdatedTime(LocalDate updatedTime) 
    {
        this.updatedTime = updatedTime;
    }

    public LocalDate getUpdatedTime() 
    {
        return updatedTime;
    }


    public void setDeletedFlag(Long deletedFlag) 
    {
        this.deletedFlag = deletedFlag;
    }

    public Long getDeletedFlag() 
    {
        return deletedFlag;
    }



    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("levelCode", getLevelCode())
            .append("systemCode", getSystemCode())
            .append("systemName", getSystemName())
            .append("levelName", getLevelName())
            .append("levelIcon", getLevelIcon())
            .append("minPoints", getMinPoints())
            .append("maxPoints", getMaxPoints())
            .append("sortOrder", getSortOrder())
            .append("levelStatus", getLevelStatus())
            .append("createdBy", getCreatedBy())
            .append("createdTime", getCreatedTime())
            .append("updatedBy", getUpdatedBy())
            .append("updatedTime", getUpdatedTime())
            .append("deletedFlag", getDeletedFlag())
            .toString();
    }
}
